package assignment10;

import java.io.*; 

class WriteBinaryFile{
  public static void main ( String[] args ) throws IOException {
    	String fileName = "G:\\Users\\IOtest\\MixedTypes.txt" ;
    	DataOutputStream dataOut = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(fileName)));
    	dataOut.writeInt(10);
    	System.out.println(dataOut.size() + " bytes have been written.");
    	dataOut.writeDouble(31.2);
    	System.out.println(dataOut.size() + " bytes have been written.");
    	dataOut.writeChars("hehe");
    	System.out.println(dataOut.size() + " bytes have been written.");
    	dataOut.close();
  }
}
